Optimal. Leaf size=138 \[ -\frac{a (a f h-c d h+c e g)-c x (a e h-a f g+c d g)}{a c \sqrt{a+c x^2} \left (a h^2+c g^2\right )}-\frac{\left (d h^2-e g h+f g^2\right ) \tanh ^{-1}\left (\frac{a h-c g x}{\sqrt{a+c x^2} \sqrt{a h^2+c g^2}}\right )}{\left (a h^2+c g^2\right )^{3/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.141356, antiderivative size = 138, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 29, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.138, Rules used = {1647, 12, 725, 206} \[ -\frac{a (a f h-c d h+c e g)-c x (a e h-a f g+c d g)}{a c \sqrt{a+c x^2} \left (a h^2+c g^2\right )}-\frac{\left (d h^2-e g h+f g^2\right ) \tanh ^{-1}\left (\frac{a h-c g x}{\sqrt{a+c x^2} \sqrt{a h^2+c g^2}}\right )}{\left (a h^2+c g^2\right )^{3/2}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 1647
Rule 12
Rule 725
Rule 206
Rubi steps
\begin{align*} \int \frac{d+e x+f x^2}{(g+h x) \left (a+c x^2\right )^{3/2}} \, dx &=-\frac{a (c e g-c d h+a f h)-c (c d g-a f g+a e h) x}{a c \left (c g^2+a h^2\right ) \sqrt{a+c x^2}}+\frac{\int \frac{a c \left (f g^2-e g h+d h^2\right )}{\left (c g^2+a h^2\right ) (g+h x) \sqrt{a+c x^2}} \, dx}{a c}\\ &=-\frac{a (c e g-c d h+a f h)-c (c d g-a f g+a e h) x}{a c \left (c g^2+a h^2\right ) \sqrt{a+c x^2}}+\frac{\left (f g^2-e g h+d h^2\right ) \int \frac{1}{(g+h x) \sqrt{a+c x^2}} \, dx}{c g^2+a h^2}\\ &=-\frac{a (c e g-c d h+a f h)-c (c d g-a f g+a e h) x}{a c \left (c g^2+a h^2\right ) \sqrt{a+c x^2}}-\frac{\left (f g^2-e g h+d h^2\right ) \operatorname{Subst}\left (\int \frac{1}{c g^2+a h^2-x^2} \, dx,x,\frac{a h-c g x}{\sqrt{a+c x^2}}\right )}{c g^2+a h^2}\\ &=-\frac{a (c e g-c d h+a f h)-c (c d g-a f g+a e h) x}{a c \left (c g^2+a h^2\right ) \sqrt{a+c x^2}}-\frac{\left (f g^2-e g h+d h^2\right ) \tanh ^{-1}\left (\frac{a h-c g x}{\sqrt{c g^2+a h^2} \sqrt{a+c x^2}}\right )}{\left (c g^2+a h^2\right )^{3/2}}\\ \end{align*}
Mathematica [A] time = 0.203466, size = 137, normalized size = 0.99 \[ \frac{a^2 (-f) h+a c (d h-e g+e h x-f g x)+c^2 d g x}{a c \sqrt{a+c x^2} \left (a h^2+c g^2\right )}-\frac{\left (h (d h-e g)+f g^2\right ) \tanh ^{-1}\left (\frac{a h-c g x}{\sqrt{a+c x^2} \sqrt{a h^2+c g^2}}\right )}{\left (a h^2+c g^2\right )^{3/2}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.256, size = 862, normalized size = 6.3 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 12.2165, size = 1431, normalized size = 10.37 \begin{align*} \left [\frac{{\left (a^{2} c f g^{2} - a^{2} c e g h + a^{2} c d h^{2} +{\left (a c^{2} f g^{2} - a c^{2} e g h + a c^{2} d h^{2}\right )} x^{2}\right )} \sqrt{c g^{2} + a h^{2}} \log \left (\frac{2 \, a c g h x - a c g^{2} - 2 \, a^{2} h^{2} -{\left (2 \, c^{2} g^{2} + a c h^{2}\right )} x^{2} - 2 \, \sqrt{c g^{2} + a h^{2}}{\left (c g x - a h\right )} \sqrt{c x^{2} + a}}{h^{2} x^{2} + 2 \, g h x + g^{2}}\right ) - 2 \,{\left (a c^{2} e g^{3} + a^{2} c e g h^{2} -{\left (a c^{2} d - a^{2} c f\right )} g^{2} h -{\left (a^{2} c d - a^{3} f\right )} h^{3} -{\left (a c^{2} e g^{2} h + a^{2} c e h^{3} +{\left (c^{3} d - a c^{2} f\right )} g^{3} +{\left (a c^{2} d - a^{2} c f\right )} g h^{2}\right )} x\right )} \sqrt{c x^{2} + a}}{2 \,{\left (a^{2} c^{3} g^{4} + 2 \, a^{3} c^{2} g^{2} h^{2} + a^{4} c h^{4} +{\left (a c^{4} g^{4} + 2 \, a^{2} c^{3} g^{2} h^{2} + a^{3} c^{2} h^{4}\right )} x^{2}\right )}}, -\frac{{\left (a^{2} c f g^{2} - a^{2} c e g h + a^{2} c d h^{2} +{\left (a c^{2} f g^{2} - a c^{2} e g h + a c^{2} d h^{2}\right )} x^{2}\right )} \sqrt{-c g^{2} - a h^{2}} \arctan \left (\frac{\sqrt{-c g^{2} - a h^{2}}{\left (c g x - a h\right )} \sqrt{c x^{2} + a}}{a c g^{2} + a^{2} h^{2} +{\left (c^{2} g^{2} + a c h^{2}\right )} x^{2}}\right ) +{\left (a c^{2} e g^{3} + a^{2} c e g h^{2} -{\left (a c^{2} d - a^{2} c f\right )} g^{2} h -{\left (a^{2} c d - a^{3} f\right )} h^{3} -{\left (a c^{2} e g^{2} h + a^{2} c e h^{3} +{\left (c^{3} d - a c^{2} f\right )} g^{3} +{\left (a c^{2} d - a^{2} c f\right )} g h^{2}\right )} x\right )} \sqrt{c x^{2} + a}}{a^{2} c^{3} g^{4} + 2 \, a^{3} c^{2} g^{2} h^{2} + a^{4} c h^{4} +{\left (a c^{4} g^{4} + 2 \, a^{2} c^{3} g^{2} h^{2} + a^{3} c^{2} h^{4}\right )} x^{2}}\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{d + e x + f x^{2}}{\left (a + c x^{2}\right )^{\frac{3}{2}} \left (g + h x\right )}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.18535, size = 397, normalized size = 2.88 \begin{align*} \frac{\frac{{\left (c^{3} d g^{3} - a c^{2} f g^{3} + a c^{2} d g h^{2} - a^{2} c f g h^{2} + a c^{2} g^{2} h e + a^{2} c h^{3} e\right )} x}{a c^{3} g^{4} + 2 \, a^{2} c^{2} g^{2} h^{2} + a^{3} c h^{4}} + \frac{a c^{2} d g^{2} h - a^{2} c f g^{2} h + a^{2} c d h^{3} - a^{3} f h^{3} - a c^{2} g^{3} e - a^{2} c g h^{2} e}{a c^{3} g^{4} + 2 \, a^{2} c^{2} g^{2} h^{2} + a^{3} c h^{4}}}{\sqrt{c x^{2} + a}} - \frac{2 \,{\left (f g^{2} + d h^{2} - g h e\right )} \arctan \left (\frac{{\left (\sqrt{c} x - \sqrt{c x^{2} + a}\right )} h + \sqrt{c} g}{\sqrt{-c g^{2} - a h^{2}}}\right )}{{\left (c g^{2} + a h^{2}\right )} \sqrt{-c g^{2} - a h^{2}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]